home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{608009F3-E1FB-11D2-9BA1-0040D0002C80}#1.0#0"; "NSLOCK15VB6.OCX" Begin VB.Form frmMain BorderStyle = 1 'Fixed Single Caption = "Internet LOCKDOWN!" ClientHeight = 6165 ClientLeft = 45 ClientTop = 330 ClientWidth = 5190 Icon = "frmMain.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False Moveable = 0 'False ScaleHeight = 6165 ScaleWidth = 5190 StartUpPosition = 2 'CenterScreen Begin VB.TextBox Text1 Height = 285 IMEMode = 3 'DISABLE Left = 3720 Locked = -1 'True PasswordChar = "*" TabIndex = 8 Text = "Intruder" Top = 3720 Visible = 0 'False Width = 1095 End Begin VB.CommandButton Command2 Caption = "Options" Height = 255 Left = 3480 TabIndex = 7 Top = 0 Width = 855 End Begin VB.CommandButton Command1 Caption = "Register" Height = 255 Left = 0 TabIndex = 6 Top = 0 Width = 975 End Begin nslock15vb6.ActiveLock ActiveLock1 Left = 480 Top = 3600 _ExtentX = 847 _ExtentY = 820 Password = "YourPassword" SoftwareName = "Internet LOCKDOWN!" LiberationKeyLength= 16 SoftwareCodeLength= 16 End Begin VB.Timer Timer2 Enabled = 0 'False Interval = 1000 Left = 3840 Top = 5040 End Begin VB.Timer Timer1 Enabled = 0 'False Interval = 1 Left = 4200 Top = 5040 End Begin VB.CommandButton CmdPassword Caption = "OK" Default = -1 'True Enabled = 0 'False Height = 255 Left = 3480 TabIndex = 2 Top = 3120 Width = 855 End Begin VB.TextBox txtpassword Height = 285 IMEMode = 3 'DISABLE Left = 1680 PasswordChar = "*" TabIndex = 1 Top = 3120 Width = 1695 End Begin VB.Label Label1 Caption = "If you are off of the internet, click on the check." ForeColor = &H00FF0000& Height = 255 Left = 360 TabIndex = 5 Top = 5880 Width = 3375 End Begin VB.Image Image1 Height = 480 Left = 3840 Picture = "frmMain.frx":030A Top = 5640 Width = 480 End Begin VB.Label lblCountdown Alignment = 2 'Center Caption = "180" BeginProperty Font Name = "Comic Sans MS" Size = 72 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0000FF00& Height = 1815 Left = 1200 TabIndex = 4 Top = 3720 Width = 2415 End Begin VB.Label lblpassword Caption = "Enter Password:" Height = 255 Left = 480 TabIndex = 3 Top = 3120 Width = 1215 End Begin VB.Label lblDescription BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 2655 Left = 720 TabIndex = 0 Top = 240 Width = 3615 End Attribute VB_Name = "frmMain" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Public Function IsConnected() As Boolean Dim TRasCon(255) As RASCONN95 Dim lg As Long Dim lpcon As Long Dim RetVal As Long Dim Tstatus As RASCONNSTATUS95 ' TRasCon(0).dwSize = 412 lg = 256 * TRasCon(0).dwSize ' RetVal = RasEnumConnections(TRasCon(0), lg, lpcon) If RetVal <> 0 Then MsgBox "ERROR" Exit Function End If ' Tstatus.dwSize = 160 RetVal = RasGetConnectStatus(TRasCon(0).hRasCon, Tstatus) If Tstatus.RasConnState = &H2000 Then IsConnected = True Else IsConnected = False End If End Function Private Sub CmdPassword_Click() If txtPassword.Text = Text1.Text Then Unload Me Unload frmOptions Unload frmRegister Unload frmLogin MsgBox "Wrong Password!" End If End Sub Private Sub Command1_Click() Load frmRegister frmRegister.Show End Sub Private Sub Command2_Click() Load frmLogin frmLogin.Show End Sub Private Sub Command3_Click() DeleteSetting App.Title, "LockDown" End Sub Private Sub Form_Load() 'Retrieve Option Settings frmOptions.OptShutdown.Value = GetSetting(App.Title, "Lockdown", "OptShutdown") frmOptions.OptLogOff.Value = GetSetting(App.Title, "Lockdown", "Logoff") frmOptions.OptForce.Value = GetSetting(App.Title, "Lockdown", "Force") frmOptions.OptReboot.Value = GetSetting(App.Title, "Lockdown", "Reboot") If ActiveLock1.RegisteredUser = False Then frmMain.Caption = "Internet LOCKDOWN!! Evaluation day " & ActiveLock1.UsedDays & " of 21." frmMain.Caption = "Internet LOCKDOWN!!" End If lblCountdown.Caption = Countdown Countdown = GetSetting(App.Title, "Lockdown", "Countdown") lblCountdown.Caption = GetSetting(App.Title, "Lockdown", "Countdown") Text1.Text = GetSetting(App.Title, "Lockdown", "password") ActiveLock1.Password = "powerauthority" If Not (ActiveLock1.RegisteredUser) And ActiveLock1.UsedDays > 21 Then MsgBox "Your evaluation period has expired! Now Shutting down program!" End If If (ActiveLock1.LastRunDate > Now) Then MsgBox "Please, correct your time settings and try again!" End End If If ActiveLock1.RegisteredUser Then MsgBox "You haven't registered yet! Please register today!" MsgBox "You have " & 21 - ActiveLock1.UsedDays & " days left!" Load frmRegister frmRegister.Show End If Dim hSysMenu As Long hSysMenu = GetSystemMenu(hwnd, False) RemoveMenu hSysMenu, SC_CLOSE, MF_BYCOMMAND Timer1.Enabled = True frmMain.Visible = False App.TaskVisible = False lblDescription.Caption = "Enter the correct password to be on the Internet. You have " & Countdown & " seconds to disconnect, otherwise, the computer will restart and you will lose everything!" End Sub Private Sub Picture1_Click() End Sub Private Sub Image1_Click() If IsConnected = False Then Timer1.Enabled = True Timer2.Enabled = False Me.Visible = False MsgBox "Don't lie, you know you're not off." MsgBox "For that, the timer time will be cut in half!" Timer2.Interval = Timer2.Interval / 2 End If End Sub Private Sub Timer1_Timer() If IsConnected = True Then frmMain.Visible = True Timer2.Enabled = True End If End Sub Private Sub Timer2_Timer() If lblCountdown.Caption = "" Then Load frmOptions frmOptions.Show If lblCountdown.Caption <= 60 Then lblCountdown.ForeColor = &HFF& End If lblCountdown.Caption = lblCountdown - 1 If lblCountdown.Caption = "0" Then If frmOptions.OptShutdown.Value = True Then Dim res As Boolean res = ExitWindowsEx(EWX_SHUTDOWN, 1) ElseIf frmOptions.OptReboot.Value = True Then Dim res1 As Boolean res1 = ExitWindowsEx(EWX_REBOOT, 2) ElseIf frmOptions.OptLogOff.Value = True Then Dim res2 As Boolean res2 = ExitWindowsEx(EWX_LOGOFF, 0) ElseIf frmOptions.OptForce.Value = True Then Shutdown = 4 Dim res3 As Boolean res3 = ExitWindowsEx(EWX_FORCE, 4) End If Unload frmLogin Unload frmMain Unload frmOptions Unload frmRegister End If End If End Sub Private Sub txtPassword_Change() If txtPassword.Text = Text1.Text Then CmdPassword.Enabled = True CmdPassword.Enabled = False End If End Sub